<template>
  <div id="app">
    <el-container class="layout-container">
      <el-header class="header">
        <div class="header-content">
          <h1 class="logo">
            <el-icon><Platform /></el-icon>
            项目部署平台
          </h1>
          <div class="header-actions">
            <el-button type="primary" @click="showSettings = true">
              <el-icon><Setting /></el-icon>
              配置
            </el-button>
          </div>
        </div>
      </el-header>
      
      <el-main class="main-content">
        <router-view />
      </el-main>
    </el-container>

    <!-- 配置对话框 -->
    <el-dialog
      v-model="showSettings"
      title="服务器配置"
      width="600px"
      :close-on-click-modal="false"
    >
      <ServerSettings @close="showSettings = false" />
    </el-dialog>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { Platform, Setting } from '@element-plus/icons-vue'
import ServerSettings from '@/components/ServerSettings.vue'

const showSettings = ref(false)
</script>

<style scoped>
.layout-container {
  height: 100vh;
}

.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.main-content {
  background-color: #f5f7fa;
  padding: 20px;
}
</style>

<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
</style>
